package lookie.app.ui.explorer.state;

import javax.annotation.PostConstruct;

import org.springframework.core.io.Resource;
import org.springframework.richclient.settings.xml.XmlSettingsFactory;

public class ResourceSettingsFactory extends XmlSettingsFactory {
	
	private Resource resource;

	public Resource getResource() {
		return resource;
	}

	public void setResource(Resource resource) {
		this.resource = resource;
	}

	@PostConstruct
	public void afterPropertiesSet() throws Exception {
		setLocation(resource.getFile().getAbsolutePath());
	}

}
